package com.hdyg.csc.app;

import android.app.Application;
import com.hdyg.csc.activity.common.ActivityConllector;
import com.hdyg.csc.util.LogUtils;
import okhttp3.Cookie;

/**
 * Created by CZB on 2018/3/26
 * 修改.
 */

public class MvpApplication extends Application {

    private static MvpApplication instance;
    public static Cookie cookie;


    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        // 日志工具实例化
        LogUtils.getBuilder(this.getApplicationContext())
                .setLogSwitch(false)
                .setLog2FileSwitch(false)
                .setTag("czb")
                .create();

    }


    public static MvpApplication getContext() {
        if (instance == null) {
            instance = new MvpApplication();
        }
        return instance;
    }

    public void exit() {
        ActivityConllector.finishAll();
        System.exit(0);
    }

}
